home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2000 October / PC-WELT 10-2000.ISO / software / boot / PCWBOOT.EXE / CMOS / CMOS.TXT < prev    next >
Encoding:
Text File  |  1999-05-05  |  5.7 KB  |  131 lines

  1.  
  2.                 CMOS.COM   v1.00   05-05-1999   Charles Dye
  3.                 GPL Freeware   Copyright 1994-1999, C. Dye.
  4.                         email:  raster@highfiber.com
  5.  
  6.         This program is copyrighted, but may be freely distributed
  7.         under the terms of the Free Software Foundation's GNU General
  8.         Public License v2 (or later.)  See the file COPYING for the
  9.         legalities.  If you did not receive a copy of COPYING, you
  10.         may request one from the Free Software Foundation, Inc.,
  11.         59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  12.         ABSOLUTELY NO WARRANTY -- use it at your own risk!
  13.  
  14.  
  15.                              ---  Overview  ---
  16.  
  17. This program will save the contents of your computer's CMOS memory to a disk
  18. file, or restore it from the file.  The CMOS is a battery-powered chip which
  19. contains the computer's clock and calendar.  It also provides a small amount
  20. of memory used for basic configuration information such as the number and
  21. sizes of drives installed, memory size and speed, keyboard settings, machine
  22. password, and so on.
  23.  
  24. A utility to save and restore the CMOS data is useful for two purposes.
  25. First, the CMOS memory can be lost; this often happens when the battery runs
  26. down.  Many older machines won't boot correctly if the CMOS data is lost (it
  27. contains necessary info about the hard drive geometry.)  Having a backup copy
  28. of the CMOS contents handy on a bootable floppy disk can save time, because
  29. you don't have to look up the correct settings for your hard drive.  (On
  30. newer computers, the BIOS interrogates the hard drive directly to get the
  31. settings.  Losing the CMOS is less of a problem on these newer machines.)
  32.  
  33. Second, sometimes it's useful to be able to change CMOS options without
  34. having to run the computer's setup utility.  Especially if the setup program
  35. is on a disk in a file cabinet somewhere; or for blind users whose screen
  36. readers won't work in the BIOS setup utility.  Simply save your current CMOS
  37. data to a file, make your desired changes, and save again to a different
  38. file.  In the future, you can load the desired settings directly, without
  39. having to go through the setup program.
  40.  
  41. This program will save and restore the commonest types of CMOS memory found
  42. in most computers:  the Motorola 146818, the Dallas Semiconductor DS1687, and
  43. other hardware that emulates them.  It will save either 50 or 114 bytes of
  44. data, depending on the hardware.  (Many similar programs only save 50 bytes.)
  45. No provision is made for the extended CMOS used in EISA or MCA systems.  (I
  46. haven't had a computer of either architecture for years, so I can't even
  47. begin to test code for them.)  Also, no effort is made to save or restore the
  48. clock and calendar; if you lose your CMOS, use the DATE and TIME commands to
  49. reset the clock.
  50.  
  51. The file CMOS.S in this archive is source code for Eric Isaacson's shareware
  52. assembler A86.  Unless you plan to modify this program, you can delete CMOS.S
  53. to save disk space.  The file COPYING contains information on the GNU General
  54. Public License; if you are familiar with the GPL, this file can also safely
  55. be deleted.
  56.  
  57.  
  58.                               ---  Syntax  ---
  59.  
  60. CMOS /SAVE [filename]
  61.  
  62. Saves the contents of CMOS to a file.  The filename is optional; if you don't
  63. specify it, CMOS.SAV will be used.  (Don't type the brackets; they're only
  64. there to indicate that "filename" is optional.)  You may abbreviate /SAVE to
  65. /S.  Also allowed:  /B (for Backup) or /W (for Write.)  The switch character
  66. is not important; you may use -S instead, or even just S.
  67.  
  68. CMOS /LOAD [filename]
  69.  
  70. Loads CMOS memory from a file.  If you don't specify the filename, CMOS.SAV
  71. is used.  Legal synonyms are /L (Load) or /R (Restore.)  After loading CMOS
  72. from the file, the computer will be rebooted automatically so that the new
  73. settings will be recognized.
  74.  
  75. CMOS /I [filename]
  76.  
  77. Loads CMOS memory from a file, like /LOAD.  However, the machine is not
  78. automatically rebooted.  This option is not generally useful.
  79.  
  80. CMOS /VER [filename]
  81.  
  82. Verifies the contents of CMOS against a file.  /C (for Compare) is a synonym.
  83. In a batch file, Errorlevel 7 indicates a mismatch between the file and the
  84. current contents of CMOS.
  85.  
  86. CMOS /DUMP
  87.  
  88. Dumps the current contents of CMOS to the screen (or stdout) as hexadecimal.
  89. Useful only to hexperts.
  90.  
  91.  
  92.                            ---  Return Codes  ---
  93.  
  94. Use the ERRORLEVEL command to check the return code in a batch file.
  95.  
  96. 0 :  success
  97. 1 :  dos file error
  98. 2 :  syntax error, invalid switch or filename too long
  99. 3 :  not enough memory
  100. 4 :  no cmos?  hardware problem?
  101. 5 :  invalid or corrupt file
  102. 6 :  cmos write-verify mismatch.  hardware problem?
  103. 7 :  cmos - file mismatch
  104. 8 :  bad dos
  105.  
  106.  
  107.                          ---  Data File Format  ---
  108.  
  109. My CMOS file format is different from everyone else's; you can't share data
  110. files between my CMOS.COM and SAVECMOS.EXE or ROM2.EXE.  Mine requires a
  111. special file header to prevent you from trying to load, say, AUTOEXEC.BAT
  112. into CMOS, and to guarantee file integrity.
  113.  
  114. 4 bytes 'CMOS'  file type identifier
  115. 1 byte 10h      file version identifier (1.0)
  116. 1 byte          flags:  bit 7 = valid, bit 6 = extended cmos present
  117. 2 bytes         bios model and submodel bytes
  118. 1 word (n)      length of data (in bytes)  always 50 or 114
  119. 1 word          checksum of data  (sum of all bytes)
  120. 1 word          hashtotal of data (xor of all words)
  121. n bytes         cmos data
  122.  
  123.  
  124.                             ---  What's New  ---
  125.  
  126. v1.00   05-05-1999
  127.         Cleanup for release with FreeDOS.  Fix for 8086/8088 CPUs.  Added
  128. strings for VERSION.EXE.  Treat nul on command line as an end-of-line.
  129. Documented /I and exit codes.  Changed license to GPL.
  130.  
  131.